import request from '@/utils/request'

// 仓库列表
export const warehpuseList = (params) => {
  return request({
    url: '/api/warehouse/page',
    params
  })
}

// 获取下一个编码
export const codelist = () => {
  return request({
    url: `/api/codeFactory/next/CK`
  })
}

// 查询仓库
export const updateList = (id) => {
  return request({
    url: `/api/warehouse/${id}`
  })
}

// 新增仓库
export const addCK = (data) => {
  return request({
    url: '/api/warehouse',
    method: 'post',
    data
  })
}

// 修改仓库
export const aupdataCK = (data) => {
  return request({
    url: '/api/warehouse',
    method: 'PUT',
    data
  })
}

// 删除仓库
export const delCK = (ids) => {
  return request({
    url: `/api/warehouse/${ids}`,
    method: 'DEL'
  })
}
